home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / TFC010.422 < prev    next >
Text File  |  1993-03-09  |  7KB  |  191 lines

  1. 2TFC010.MOD 1Enhanced File Directory Listing
  2. The Flying Chicken [SysOp] #1 @12456
  3. 3Sunday, March 7, 1993  1 7:55 pm
  4. TFC010.MOD - Enhanced File Directory Listing
  5. Author: The Flying Chicken 1@12456 (WWIVLink) 1@2456 (WWIVnet) 1@2456 (IceNet)
  6. Source: WWIV 4.20 thru 4.22
  7. Version: 1.05
  8.  
  9.  
  10.     /* THIS FILE IS FOR WWIV 4.22 ONLY!  IF YOU USE 4.21A OR UNDER,
  11.        CLOSE THIS FILE, AND OPEN TFC010.MOD                           */
  12.  
  13.     This mod is just like my Subs Listing, but for the file
  14.     directories.  It shows the directory number, name, whether
  15.     or not the directory is in your New scan, and the number
  16.     of new files as well as the total number of files.  A sample
  17.     listing is shown below, of course, the colors have been
  18.     removed.
  19.  
  20.     If you're upgrading the mod, just replace your dirlist() with
  21.     the one below.
  22.  
  23.  
  24. Dir                                                    New    Total
  25.  #    Scn?               Directory Name               Files   Files
  26. ────┬────────────────────────────────────────────────┬──────┬───────
  27.  99 │ XXX │ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX │ 9999 │ 9999
  28.  99 │ XXX │ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX │ 9999 │ 9999
  29.  99 │ XXX │ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX │ 9999 │ 9999
  30.  99 │ XXX │ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX │ 9999 │ 9999
  31.  99 │ XXX │ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX │ 9999 │ 9999
  32.  99 │ XXX │ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX │ 9999 │ 9999
  33.  
  34.  
  35. v1.05 Upgrade for 4.22
  36. v1.03 Bug Fixes - Don't scan directory if user doesn't have access
  37.                   to it (DSL or DAR restrictions), add titles.
  38. v1.02 Bug Fixes - Still had one more bug, and the directory list
  39.                   now aborts quickly.
  40. v1.01 Bug Fixes - wasn't closing all the files properly, missed
  41.                   a color code, removed get_string() calls.
  42. v1.00 Original Release
  43.  
  44.  
  45.     Before using this or any mod, back up your source !!!!!
  46.  
  47.                 PKZIP source *.c *.h *.mak
  48.  
  49.     If you mess something up later and want to unstall the mod,
  50.     just type:
  51.  
  52.                 PKUNZIP source -o
  53.  
  54.  
  55.     First and most important, I removed the color codes to make this
  56.     mod readable by all users.  If you use colors, search THIS FILE,
  57.     replacing ^C by a Ctrl-C.  To create Ctrl-C (which is a heart on
  58.     your screen), using the Turbo C editor, type Ctrl-P, Ctrl-C.  This
  59.     also works in most editors.  If you can't use colors, remove the
  60.     ^C and the number immediately after it.
  61.  
  62.     1.  Load up BBS.C.  Remove the entire void dirlist().  You
  63.         will be moving it to XFER.C, which is where I think it
  64.         should be anyway.  This won't work if you don't do this
  65.         step.
  66.  
  67.     2.  Load up XFER.C.  Add the entire void dirlist() below
  68.         at the end of the file.
  69.  
  70. void dirlist()                               /* ADD ENTIRE VOID */
  71. {
  72.   int i,abort,i1,i2,sam,tally;
  73.   char s[80],s1[6];
  74.   uploadsrec u;
  75.  
  76.   abort=0;
  77.   nl();
  78.   pla("^C2Available file directories: ",&abort);
  79.   nl();
  80.   prt(2,"Dir                                                    New    Total");
  81.   nl();
  82.   prt(2," #    Scn?               Directory Name               Files   Files");
  83.   nl();
  84.   ansic(7);
  85.   for (i1=0;i1<68;i1++)
  86.     if (okansi())
  87.         outchr(196);
  88.     else
  89.         outchr(45);
  90.   nl();
  91.  
  92.   i=0;
  93.   while ((i<num_dirs) && (udir[i].subnum!=-1) && (!abort)) {
  94.     i2=udir[i].subnum;
  95.     if (qsc_n[i2/32]&(1L<<(i2%32)))
  96.         strcpy(s1," * ");
  97.     else
  98.         strcpy(s1,"   ");
  99.     dliscan1(i2);
  100.     if (dlf<0) {
  101.         npr("Error reading data file!\r\n");
  102.         closedl();
  103.         return;
  104.     }
  105.     sam=1;
  106.     for (i1=1; i1<=numf; i1++) {
  107.         SETREC(i1);
  108.         read(dlf,(void *)&u,sizeof(uploadsrec));
  109.         if (u.daten>=nscandate)
  110.             sam++;
  111.     }
  112.     sam-=1;
  113.     if (okansi())
  114.         sprintf(s," ^C2%2s ^C7│ ^C6%3s ^C7│ ^C1%-40.40s ^C7│ ^C3%4d ^C7│ ^C2%4d
  115. ",
  116.             udir[i].keys, s1, directories[i2].name,sam,numf);
  117.     else
  118.         sprintf(s," ^C2%2s ^C7| ^C6%3s ^C7| ^C1%-40.40s ^C7| ^C3%4d ^C7| ^C2%4d
  119. ",
  120.             udir[i].keys, s1, directories[i2].name,sam,numf);
  121.     pla(s,&abort);
  122.     i++;
  123.     closedl();
  124.   }
  125.   if (i==0)
  126.     pla("None.",&abort);
  127.   nl();
  128. }
  129.  
  130.  
  131.     3.  Save XFER.C and load up FCNS.H.  Search for /*File: bbs.c*/
  132.         and remove the line below.  If you can MAKE FCNS, you
  133.         are done, just type MAKE FCNS before you compile.
  134.  
  135. void dirlist();
  136.  
  137.  
  138.     4.  Search for /*File: xfer.c*/ and add the line at the end.
  139.         Again, if you can MAKE FCNS, skip this step.
  140.  
  141.  
  142. void dirlist();
  143.  
  144.     DISCLAIMER:  I make no guarantees with this mod whatsoever.
  145.     Your installation of the mod is your acceptance of any
  146.     damages caused to your hardware or software, incendental or
  147.     otherwise.
  148.  
  149.     The mod was tested with the versions of WWIV mentioned in
  150.     this file. If the mod does NOT work for you, e-mail one of
  151.     the addresses above, and tell me EXACTLY what you did, what
  152.     the screen said, and what you did to try to fix it, and I'll
  153.     do what I can to help you out.
  154.  
  155.     PLEASE REPORT ANY BUGS TO ME AT THE ABOVE ADDRESS !!!!!!!
  156.     Any other comments, suggestions, hints, things I missed,
  157.     requests for new mods, and general "Thank you!"s are all VERY
  158.     welcomed, so drop me a line.  I don't mind updates to this
  159.     mod, but do request that you send me a courtesy copy of the
  160.     changes you made.
  161.  
  162.     *****************************************************************
  163.                               Subscribe to:
  164.  
  165.                     Modding with WWIV's Flying Chicken
  166.  
  167.               WWIVLink subtype 42456, Host @12456 (REQable)
  168.                WWIVNet subtype 42456, Host @2456 (REQable)
  169.                 IceNet subtype 42456, Host @2456 (REQable)
  170.  
  171.        All mods are released on this sub first.  Occasionally, they
  172.        make the mods subs, but usually much later.  Subscribe now!
  173.     *****************************************************************
  174.  
  175.                            The Flying Chicken
  176.        1@12456 (WWIVLink)  -  1@2456 (WWIVNet) - 1@2456 (IceNet)
  177.  
  178.                          THE INSANE ASYLUM BBS
  179.                     In Operation Since August, 1989
  180.  
  181.                    Running WWIV 4.22++  (Reg #21260)
  182.           SysOp: The Flying Chicken  -  CoSysOp: Dr. Doolittle
  183.                   Snarfable  -  Auto-SysOp Validation
  184.                  Callback Validation (Local calls only)
  185.                (214) 570-5950  -  USR Dual Std (v32/HST)
  186.  
  187.                           --- END OF LINE ---
  188. 9
  189. 9     7┌───2The─Insane─Asylum7───2(214)7──2570-59507───2WWIV─Support7───2USR─DS7───┐0
  190. 8     7└──────────────2We─Put─The─Bubbles─Back─Into─BBSing7────────────────┘0
  191.